home *** CD-ROM | disk | FTP | other *** search
- /*© Copyright 1988-1992 UserLand Software, Inc. All Rights Reserved.*/
-
- #include "iacinternal.h"
-
-
-
-
- Boolean IACinstallhandler (AEEventClass eventclass, AEEventID id, ProcPtr handler) {
-
- register OSErr errcode;
-
- errcode = AEInstallEventHandler (eventclass, id, (EventHandlerProcPtr) handler, 0, false);
-
- IACglobals.errorcode = errcode;
-
- return (errcode == noErr);
- } /*AEinstallhandler*/
-
-
- Boolean IACremovehandler (AEEventClass eventclass, AEEventID id, ProcPtr handler) {
-
- register OSErr errcode;
-
- errcode = AERemoveEventHandler (eventclass, id, (EventHandlerProcPtr) handler, false);
-
- IACglobals.errorcode = errcode;
-
- return (errcode == noErr);
- } /*IACremovehandler*/
-
-
- Boolean IAChandlerinstalled (OSType vclass, OSType vtoken, Boolean flsystemhandler) {
-
- /*
- return true if there's a handler installed with the indicated class and id.
-
- if flsystemhandler is true, we only consider system event handlers, if false
- we only consider app-specific handlers.
- */
-
- OSErr ec;
- EventHandlerProcPtr handler;
- long refcon;
-
- ec = AEGetEventHandler (vclass, vtoken, &handler, &refcon, flsystemhandler);
-
- IACglobals.errorcode = ec;
-
- return (ec == noErr);
- } /*IAChandlerinstalled*/
-
-
- Boolean IACinstallcoercionhandler (DescType fromtype, DescType totype, ProcPtr handler) {
-
- register OSErr errcode;
-
- errcode = AEInstallCoercionHandler (fromtype, totype, handler, (long) 0, false, false);
-
- IACglobals.errorcode = errcode;
-
- return (errcode == noErr);
- } /*IACinstallcoercionhandler*/
-
-
-
-